#ifndef __EEPROM_H__
#define __EEPROM_H__
#include "gd32f10x.h"
#include "controller.h"
#define EEPROM_DEVICE_ADDRESS       0xA0
#define EEPROM_OPS_WRITE            (EEPROM_DEVICE_ADDRESS & ~0X01)
#define EEPROM_OPS_READ             (EEPROM_DEVICE_ADDRESS | 0X01)

void eeprom_write_bytes(uint8_t addr, uint8_t *buf, uint16_t len);
void eeprom_read_bytes(uint8_t addr, uint8_t *buf, uint16_t len);
uint8_t storage_params_check(void);
void storage_params_save(Controller *ctrler);
void storage_params_read(Controller *ctrler);
#endif
